package com.czxy.domain;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component  //交给Spring管理
@Aspect    // 声明是这个类是切面类
public class UserAspect01 {

    @Before("execution(public  void  com.czxy.domain.User.eat())")
    public  void bfEat(){
        System.out.println("洗手");

    }

    @After("execution(public  void com.czxy.domain.User.eat())")
    public  void afEat(){
        System.out.println("擦嘴");

    }




}
